package com.example.tests;

import org.testng.annotations.Test;


public class GroupCreationTests extends BaseClass {
	
	@Test
	public void testNonEmptyGroupCreation() throws Exception {
		app.getNavigationWorker().openMainPage();
		app.getNavigationWorker().gotoGroupsPage();
		app.getActionWorker().initCreation();
		GroupObject groupInfo = new GroupObject();
		groupInfo.groupName = "group name 1";
		groupInfo.groupHeader = "group header 1";
		groupInfo.groupFooter = "group footer 1";
		app.getGroupWorker().fillupGroupForm(groupInfo);
		app.getActionWorker().submitCreation();
		app.getNavigationWorker().returntoGroupsPage();
	}

	@Test
	public void testEmptyGroupCreation() throws Exception {
		app.getNavigationWorker().openMainPage();
		app.getNavigationWorker().gotoGroupsPage();
		app.getActionWorker().initCreation();
		app.getActionWorker().submitCreation();
		app.getNavigationWorker().returntoGroupsPage();
	}
	
	@Test
	public void testEmptyFieldsGroupCreation() throws Exception {
		app.getNavigationWorker().openMainPage();
		app.getNavigationWorker().gotoGroupsPage();
		app.getActionWorker().initCreation();
		GroupObject groupInfo = new GroupObject();
		groupInfo.groupName = "group type 2";
		groupInfo.groupHeader = "";
		groupInfo.groupFooter = "";
		app.getGroupWorker().fillupGroupForm(groupInfo);
		app.getActionWorker().submitCreation();
		app.getNavigationWorker().returntoGroupsPage();
	}
	
}

